<%inherit file="/admin/account/base.html" />

<%block name="innav">
<li><a href="${ reverse_url('admin:group') }">${ _("Group") }</a></li>
<li>${ _("View") } <a href="${ reverse_url('admin:group') }?id=${ GROUP.id }">${ GROUP.name }</a></li>
</%block>

<%block name="submain">

<table class="kv">
  <tbody>
    <tr>
      <td>${ _("ID") }</td>
      <td>${ GROUP.id }</td>
    </tr>
    <tr>
      <td>${ _("Name") }</td>
      <td>${ GROUP.name }</td>
    </tr>
    <tr>
      <td>${ _("Islocked") }</td>
      <td>${ GROUP.islocked }</td>
    </tr>
    <tr>
      <td>${ _("description") }</td>
      <td>${ GROUP.description }</td>
    </tr>
  </tbody>
</table>


% if GROUP.users:
<p><a class="ly-btn2 small blue" href="${ reverse_url('admin:user') }?gid=${ GROUP.id }">${ _("All users in this group.") }</a></p>
% else:
<p>${ _("No users in this group !") }</p>
% endif

<h3 class="subtitle">${ _("Permission List") }</h3>

% if GROUP.permissions:

<div>
  <table class="ly-table">
    <thead>
      <tr>
    <th>${ _("ID") }</th>
    <th>${ _("Codename") }</th>
    <th>${ _("Name") }</th>
      </tr>
    </thead>
    <tbody>
      % for P in GROUP.permissions:
      <tr>
        <td>${ P.id }</td>
    <td><a href="${ reverse_url('admin:permission') }?id=${ P.id }">${ P.codename }</a></td>
    <td>${ P.name }</td>
      </tr>
      % endfor
    </tbody>
  </table>
</div>

% else:

<p>${ _("This group cantains no permissions !") }</p>

% endif


</%block>
